package com.zs.zcerp.approval.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zs.zcerp.approval.entity.*;
import com.zs.zcerp.common.entity.QueryRequest;

import java.util.List;

/**
 * @author Henry
 * @email *****@mail.com
 * @date 2021-04-09 20:58:44
 */
public interface IQhChkmgrdService extends IService<QhChkmgrdEntity> {

    /**
     * 查找单据签核详细信息
     *
     * @param request         request
     * @param qhChkmgrdEntity 基本单据签核对象，用于传递查询条件
     * @return IPage
     */
    IPage<QhChkmgrdEntity> findApprovalsDetailList(QhChkmgrdEntity qhChkmgrdEntity, QueryRequest request);

    /**
     * 查询签核人员数据
     * @param orderNo
     * @return
     */
    List<QhChkmgrdEntity> findSignList(String orderNo);

    /**
     * 通过用户名查找用户详细信息
     *
     * @param basestdNo 基本单据签核id
     * @return 基本单据签核对象信息
     */
    //QhChkmgrdEntity findApprovalsDetailList(String basestdNo);


    /**
     * 修改单据签核
     * @param qhChkmgrdEntity qhChkmgrdEntity
     */
    void updateaAprovals(QhChkmgrdEntity qhChkmgrdEntity);

    /**
     * 单据回签核
     * @param qhChkmgrdEntity
     */
    void updateaMainSign(QhChkmgrdEntity qhChkmgrdEntity);

    /**
     *删除单个对象
     * @param orderyNo
     */
    void deleteByOrderyNo(String orderyNo);

    void updateStatus(QhChkmgrdEntity qhChkmgrdEntity);

    void updateByToUser(QhChkmgrdEntity qhChkmgrdEntity, String toUser);

    void upadteNextUser(String oldNextUser, String newNextUser);




    /**
     * 回签数据到erp   默认1改成99
     * @param orderNo
     */
    void destorySignStatus(String orderNo);


    /**
     * 驳回签数据到erp   改成1
     * @param orderNo
     */
    void rejectDestoryStatus(String orderNo);

    /** 获取报表
     * @return*/
    List<DestoryReportEntity> findListReport(QhChkmgrdEntity qhChkmgrdEntity);

    /**
     * AD报表内容
     * @param qhChkmgrdEntity
     * @return
     */
    List<ADReportEntity> findAdReport(QhChkmgrdEntity qhChkmgrdEntity);

    /**
     *
     /**
     * AD报表title
     * @param qhChkmgrdEntity
     * @return
     */
    List<ADReportEntity> findAdReportTitle(QhChkmgrdEntity qhChkmgrdEntity);


    /***
     *  BC品裁片销毁表报表title
     * @param qhChkmgrdEntity
     * @return
     */
    SeReportEntity findSeReportTitle(QhChkmgrdEntity qhChkmgrdEntity);
    /**
     *  BC品裁片销毁表内容
     * @param qhChkmgrdEntity
     * @return
     */
    List<SeReportEntity> findSeReport(QhChkmgrdEntity qhChkmgrdEntity);

    /**
     * 采购单报表
     * @param qhChkmgrdEntity
     * @return
     */
    List<OrderReportEntity> findOrderReport(QhChkmgrdEntity qhChkmgrdEntity);


    /**
     *固定资产异动单号 title
     * @param qhChkmgrdEntity
     * @return
     */
    OrderFatrEntity findFatrOrderTitle(QhChkmgrdEntity qhChkmgrdEntity);


    /**
     *固定资产异动单号 内容
     * @param qhChkmgrdEntity
     * @return
     */
    List<OrderFatrEntity> findFatrReport(QhChkmgrdEntity qhChkmgrdEntity);


    /**
     *固定资产转入单号 内容
     * @param qhChkmgrdEntity
     * @return
     */
    List<OrderFatrEntity> findFainReport(QhChkmgrdEntity qhChkmgrdEntity);

    /**
     * 总工务采购单抬头
     * @param qhChkmgrdEntity
     * @return
     */
    GAPOReportEntity findGAPOTitle(QhChkmgrdEntity qhChkmgrdEntity);

    /**
     * 总工务采购单
     * @param qhChkmgrdEntity
     * @return
     */
    List<GAPOReportEntity> findGAPOReport(QhChkmgrdEntity qhChkmgrdEntity);

    /**
     * 模具采购单抬头
     * @param qhChkmgrdEntity
     * @return
     */
    MDPOReportEntity findMDPOTitle(QhChkmgrdEntity qhChkmgrdEntity);

    /**
     * 模具采购单
     * @param qhChkmgrdEntity
     * @return
     */
    List<MDPOReportEntity> findMDPOReport(QhChkmgrdEntity qhChkmgrdEntity);

    /**
     * 采购单抬头
     * @param qhChkmgrdEntity
     * @return
     */
    PO6ReportEntity findPO6Title(QhChkmgrdEntity qhChkmgrdEntity);

    /**
     * 采购单明细
     * @param qhChkmgrdEntity
     * @return
     */
    List<PO6ReportEntity> findPO6Report(QhChkmgrdEntity qhChkmgrdEntity);

    /**
     * 变更单抬头
     * @param qhChkmgrdEntity
     * @return
     */
    PGReportEntity findPGTitle(QhChkmgrdEntity qhChkmgrdEntity);

    /**
     * 变更单明细
     * @param qhChkmgrdEntity
     * @return
     */
    List<PGReportEntity> findPGReport(QhChkmgrdEntity qhChkmgrdEntity);

    OrderXPOEntity findXPOOrderTitle(QhChkmgrdEntity qhChkmgrdEntity);

    List<OrderXPOEntity> findXPOReport(QhChkmgrdEntity qhChkmgrdEntity);

    OrderXPCEntity findXPCOrderTitle(QhChkmgrdEntity qhChkmgrdEntity);

    List<OrderXPCEntity> findXPCReport(QhChkmgrdEntity qhChkmgrdEntity);

    /**
     * 补料采购单 抬头
     * @param qhChkmgrdEntity 查询参数
     * @return 抬头
     */
    OrderBPOTitleEntity findBPO19Title(QhChkmgrdEntity qhChkmgrdEntity);
    /**
     * 补料总表转采购单 抬头
     * @param qhChkmgrdEntity 查询参数
     * @return 抬头
     */
    OrderBPOTitleEntity findBPO20Title(QhChkmgrdEntity qhChkmgrdEntity);
    /**
     * 补料采购单/补料总表转采购单
     * @param qhChkmgrdEntity 查询参数
     * @return 明细
     */
    List<OrderBPODetailEntity> findBPODetail(QhChkmgrdEntity qhChkmgrdEntity);

    KFPOReportEntity findKFPOTitle(QhChkmgrdEntity qhChkmgrdEntity);

    List<KFPOReportEntity> findKFPOReport(QhChkmgrdEntity qhChkmgrdEntity);

    KFPRReportEntity findKFPRTitle(QhChkmgrdEntity qhChkmgrdEntity);

    List<KFPRReportEntity> findKFPRReport(QhChkmgrdEntity qhChkmgrdEntity);

    KFPOReportEntity findKFPO2Title(QhChkmgrdEntity qhChkmgrdEntity);

    List<KFPOReportEntity> findKFPO2Report(QhChkmgrdEntity qhChkmgrdEntity);

    WOReportEntity findWOTitle(QhChkmgrdEntity qhChkmgrdEntity);

    List<WOReportEntity> findWOReport(QhChkmgrdEntity qhChkmgrdEntity);

    List<EmpEntity> querySignYesterDay();

    List<SignDetail> selectDetail(String orderNo, String itemType, String orgId);

    List<String> getOrderList(QhBasestdDEntity q);

    void updateToUserAndNextUser(QhChkmgrdEntity qhChkmgrdEntity, List<String> orderList);
}

